<!DOCTYPE html>
<html lang="en" class="app">

<head>
    <meta charset="utf-8"/>
    <title>{{ $frame['title'] }}-管理后台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/public/theme/js/jPlayer/jplayer.flat.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/bootstrap.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/animate.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/font-awesome.min.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/simple-line-icons.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/font.css" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/css/app.css" type="text/css"/>
    <link rel="icon" sizes="any" mask="" href="{{ config('web_ico') }}">
    @yield('css')
    <!--[if lt IE 9]>
    <script src="/public/theme/js/ie/html5shiv.js"></script>
    <script src="/public/theme/js/ie/respond.min.js"></script>
    <script src="/public/theme/js/ie/excanvas.js"></script>
    <![endif]-->
</head>

<body class="">
<section class="vbox">
    <header class="bg-white-only header header-md navbar navbar-fixed-top-xs">
        <div class="navbar-header aside bg-info dk">
            <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen,open" data-target="#nav,html">
                <i class="icon-list"></i>
            </a>
            <a href="{{ route('index') }}" target="_blank" class="navbar-brand text-lt">
                <i class="icon-rocket ico"></i>
                <span class="hidden-nav-xs m-l-sm" style="font-family: 'Comic Sans MS'">Admin</span>
            </a>
            <a class="btn btn-link visible-xs" data-toggle="dropdown" data-target=".user">
                <i class="icon-settings"></i>
            </a>
        </div>
        <ul class="nav navbar-nav hidden-xs">
            <li>
                <a href="#nav,.navbar-header" data-toggle="class:nav-xs,nav-xs" class="text-muted">
                    <i class="fa fa-indent text"></i>
                    <i class="fa fa-dedent text-active"></i>
                </a>
            </li>
        </ul>
        <div class="navbar-right ">
            <ul class="nav navbar-nav m-n hidden-xs nav-user user">
                <li class="dropdown">
                    <a href="/" target="_blank" class=" bg clear">
                        网站首页
                    </a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle bg clear" data-toggle="dropdown">
                        <span class="thumb-sm avatar pull-right m-t-n-sm m-b-n-sm m-l-sm">
                        <img src="/miya.png" alt="{{ config('set.web_name') }}">
                        </span>
                        {{ \Auth::guard('admin')->user()->name }}<b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight">
                        <li>
                            <span class="arrow top"></span>
                            <a target="_blank" href="{{ route('index') }}">网站首页</a>
                        </li>
                        <li>
                            <a href="{{ route('admin.index.set') }}">配置信息</a>
                        </li>
                        <li>
                            <a href="{{ route('admin.message.message') }}">
                                <span class="badge bg-danger pull-right">{{ $messageNum }}</span>
                                留言信息
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('admin.index.help') }}">帮助</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="{{ route('admin.index.logout') }}">登出</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </header>
    <section>
        <section class="hbox stretch">
            <!-- .aside -->
            <aside class="bg-black dk aside hidden-print" id="nav">
                <section class="vbox">
                    <section class="w-f-md scrollable">
                        <div class="slim-scroll" data-height="auto" data-disable-fade-out="true" data-distance="0"
                             data-size="10px" data-railOpacity="0.2">
                            <!-- nav -->
                            <nav class="nav-primary hidden-xs">
                                <ul class="nav bg clearfix">
                                    <li class="hidden-nav-xs padder m-t m-b-sm text-xs text-muted">
                                        网站设置
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.index') }}">
                                            <i class="icon-disc icon text-success"></i>
                                            <span>网站统计</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.versions') }}">
                                            <i class=" fa-upload fa text-danger"></i>
                                            <span>版本信息</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.set') }}">
                                            <i class="icon-settings icon text-info"></i>
                                            <span>配置信息</span>
                                        </a>
                                    </li>
                                    @if( (bool)\Auth::guard('admin')->user()->is_root )
                                        <li>
                                            <a href="{{ route('admin.index.admin') }}">
                                                <i class="icon-drawer icon text-primary-lter"></i>
                                                <span>管理员</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="{{ route('admin.index.area') }}">
                                                <i class="icon-list icon  text-info-dker"></i>
                                                <span>地区管理</span>
                                            </a>
                                        </li>
                                    @endif
                                    <li>
                                        <a href="{{ route('admin.index.logout') }}" data-target="#content"
                                           data-el="#bjax-el"
                                           data-replace="true">
                                            <i class="icon-social-youtube icon  text-primary"></i>
                                            <span>登出后台</span>
                                        </a>
                                    </li>
                                    <li class="m-b hidden-nav-xs"></li>
                                </ul>
                                <ul class="nav" data-ride="collapse">
                                    <li class="hidden-nav-xs padder m-t m-b-sm text-xs text-muted">
                                        内容管理
                                    </li>
                                    <li>
                                        <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                            <i class="icon-social-dropbox icon text-danger"></i>
                                            <span>企业信息</span>
                                        </a>
                                        <ul class="nav dk text-sm">
                                            <li>
                                                <a href="{{ route('admin.page.pagelabel') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <span>信息模块</span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="{{ route('admin.page.pageinfo') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <span>信息列表</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                            <i class="icon-picture ico text-ff552e"></i>
                                            <span>Banner管理</span>
                                        </a>
                                        <ul class="nav dk text-sm">
                                            @if( (bool)\Auth::guard('admin')->user()->is_root )
                                                <li>
                                                    <a href="{{ route('admin.banner.label') }}" class="auto">
                                                        <i class="fa fa-angle-right text-xs"></i>
                                                        <span>Banner标签</span>
                                                    </a>
                                                </li>
                                            @endif
                                            <li>
                                                <a href="{{ route('admin.banner.banner') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <span>图片列表</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    @if( (bool)\Auth::guard('admin')->user()->is_root )
                                        <li>
                                            <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                                <i class="icon-puzzle icon text-primary"></i>
                                                <span>信息模块</span>
                                            </a>
                                            <ul class="nav dk text-sm">
                                                <li>
                                                    <a href="{{ route('admin.chunk.chunk') }}" class="auto">
                                                        <i class="fa fa-angle-right text-xs"></i>
                                                        <span>信息模块</span>
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    @endif

                                    @foreach($chunklist as $id => $name)
                                        <li class="">
                                            <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                                <i class="icon-layers icon text-info"></i>
                                                <span>{{ $name }}</span>
                                            </a>
                                            <ul class="nav dk text-sm">
                                                <li>
                                                    <a href="{{ route('admin.sort.sort',$id) }}" class="auto">
                                                        <i class="fa fa-angle-right text-xs"></i>
                                                        <span>信息分类</span>
                                                    </a>
                                                </li>
                                                <li>
                                                    <a href="{{ route('admin.info.info',$id) }}" class="auto">
                                                        <i class="fa fa-angle-right text-xs"></i>
                                                        <span>信息列表</span>
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    @endforeach
                                    @if( (bool)\Auth::guard('admin')->user()->is_root )
                                        <li>
                                            <a href="{{ route('admin.box.box') }}">
                                                <i class="fa-inbox fa text-ff552e"></i>
                                                <span>内容盒子</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="{{ route('admin.fragment.fragment') }}">
                                                <i class="icon-pie-chart ico text-primary"></i>
                                                <span>信息碎片</span>
                                            </a>
                                        </li>
                                    @endif
                                    <li>
                                        <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                            <i class="fa-edit fa text-success"></i>
                                            <span>留言反馈</span>
                                        </a>
                                        <ul class="nav dk text-sm">
                                            @if( (bool)\Auth::guard('admin')->user()->is_root )
                                                <li>
                                                    <a href="{{ route('admin.message.field') }}" class="auto">
                                                        <i class="fa fa-angle-right text-xs"></i>
                                                        <span>留言设置</span>
                                                    </a>
                                                </li>
                                            @endif
                                            <li>
                                                <a href="{{ route('admin.message.message') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <b class="badge bg-success dker pull-right">{{ $messageNum }}</b>
                                                    <span>留言信息</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li style="display:none">
                                        <a href="#" class="auto">
                                            <span class="pull-right text-muted">
                                            <i class="fa fa-angle-left text"></i>
                                            <i class="fa fa-angle-down text-active"></i>
                                            </span>
                                            <i class="icon-earphones ico text-danger"></i>
                                            <span>工单管理</span>
                                        </a>
                                        <ul class="nav dk text-sm">
                                            <li>
                                                <a href="{{ route('admin.workorder.index') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <span>工单列表</span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="{{ route('admin.workorder.add') }}" class="auto">
                                                    <i class="fa fa-angle-right text-xs"></i>
                                                    <span>添加工单</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                                <ul class="nav text-sm">
                                    <li class="hidden-nav-xs padder m-t m-b-sm text-xs text-muted">
                                        其他操作
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.user.index') }}">
                                            <i class="icon-users icon"></i>
                                            <span>会员管理</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.friendlylink.friendlylink') }}">
                                            <i class="icon-link icon"></i>
                                            <span>友情链接</span>
                                        </a>
                                    </li>
                                    @if( extension_loaded('fileinfo') )
                                        <li>
                                            <a href="{{ route('admin.water.water') }}">
                                                <i class="icon-magic-wand ico"></i>
                                                <span>水印设置</span>
                                            </a>
                                        </li>
                                    @endif
                                    <li>
                                        <a href="{{ route('admin.seo.sync_data') }}">
                                            <i class="icon-bar-chart ico"></i>
                                            <span>软件同步</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.clear.clear') }}">
                                            <i class="fa-cut fa"></i>
                                            <span>小工具</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.operate') }}">
                                            <i class="fa-list-alt fa"></i>
                                            <span>操作记录</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.help') }}">
                                            <i class="fa-stethoscope fa"></i>
                                            <span>帮助中心</span>
                                        </a>
                                    </li>
                                </ul>
                            </nav>
                            <!-- / nav -->
                        </div>
                    </section>
                    <footer class="footer hidden-xs no-padder text-center-nav-xs">
                        <div class="bg hidden-xs ">
                            <div class="dropdown dropup wrapper-sm clearfix">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <span class="thumb-sm avatar pull-left m-l-xs">
                                    <img src="/miya.png" class="" alt="{{ config('set.web_name') }}">
                                    <i class="on b-black"></i>
                                    </span>
                                    <span class="hidden-nav-xs clear">
                                    <span class="block m-l">
                                    <strong class="font-bold text-lt">{{ \Auth::guard('admin')->user()->name }}</strong>
                                    <b class="caret"></b>
                                    </span>
                                    <span class="text-muted text-xs block m-l">{{ (bool)\Auth::guard('admin')->user()->is_root?'超级管理员':'普通管理员' }}</span>
                                    </span>
                                </a>
                                <ul class="dropdown-menu animated fadeInRight aside text-left">
                                    <li>
                                        <span class="arrow bottom hidden-nav-xs"></span>
                                        <a href="{{ route('admin.index.set') }}">配置信息</a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.admin') }}">账号设置</a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.message.message') }}">
                                            <span class="badge bg-danger pull-right">{{ $messageNum }}</span>
                                            在线留言
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{{ route('admin.index.help') }}">帮助信息</a>
                                    </li>
                                    <li class="divider"></li>
                                    <li>
                                        <a href="{{ route('admin.index.logout') }}">登出</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </footer>
                </section>
            </aside>
            <!-- /.aside -->
            <section id="content">
                <section class="vbox">
                    <header class="header bg-light dk">
                        <p>{{ $frame['title'] }}</p>
                    </header>
                    <section class="scrollable wrapper">
                        <div class="row">
                            <div class="col-lg-12">
                                <!-- 页面面包屑 S -->
                                <ul class="breadcrumb">
                                    <li><a href="{{ route('admin.index.index') }}"><i class="fa fa-home"></i> 首页</a>
                                    </li>
                                    <li><a href="#"><i class="fa fa-list-ul"></i> {{ $frame['controller'] }}</a></li>
                                    <li class="active">{{ $frame['title'] }}</li>
                                </ul>
                                <!-- 页面面包屑 E -->
                            </div>
                            @if (!empty(session()->get('message')))
                                <div class="col-md-12">
                                    <div class="alert alert-success">
                                        <button type="button" class="close" data-dismiss="alert">×</button>
                                        <i class="fa fa-ok-sign"></i><strong>{{ session()->get('message')['msg'] }}</strong> {{ session()->get('message')['explain'] }}
                                    </div>
                                </div>
                            @endif
                            @if (!empty(session()->get('clear')))
                                <div class="col-md-12">
                                    <div class="alert alert-danger">
                                        <button type="button" class="close" data-dismiss="alert">×</button>
                                        <i class="fa fa-ok-sign"></i><strong>{{ session()->get('clear')['msg'] }}</strong> {{ session()->get('clear')['explain'] }}
                                    </div>
                                </div>
                            @endif
                            @if (count($errors) > 0)
                                <div class="col-md-12">
                                    <div class="alert alert-danger">
                                        <ul>
                                            @foreach ($errors->all() as $error)
                                                <li>{{ $error }}</li>
                                            @endforeach
                                        </ul>
                                    </div>
                                </div>
                            @endif

                            @yield('content')
                        </div>
                    </section>
                </section>
                <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen,open"
                   data-target="#nav,html"></a>
            </section>
        </section>
    </section>
</section>
<script src="/public/theme/js/miya.js"></script>
<script src="/public/theme/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="/public/theme/js/bootstrap.js"></script>
<!-- App -->
<script src="/public/theme/js/app.js"></script>
<script src="/public/theme/js/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/public/theme/js/app.plugin.js"></script>
<script type="text/javascript" src="/public/theme/js/jPlayer/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="/public/theme/js/jPlayer/add-on/jplayer.playlist.min.js"></script>
<script type="text/javascript" src="/public/theme/js/jPlayer/demo.js"></script>
<script>
    window.onload = function () {
        var oHtml = document.getElementsByTagName("html")[0];
        oHtml.onkeydown = function (ev) {
            var e = ev || event;
            var shiftKey = e.shiftKey || e.metaKey;
            if (shiftKey && e.keyCode == 83) {
                $('input').blur();
                $('button[type="submit"]').click();
            }
        }
    }
</script>
@yield('js')
</body>

</html>
